<!DOCTYPE html> 
<html><head> 
	<title>Dresscode</title> 	
	<meta name="viewport" content="width=device-width, initial-scale=1"> 
	<link rel="stylesheet" href="css/rightsize2.min.css" />
	<link rel="stylesheet" href="css/jquery.mobile.structure-1.0rc2.min.css" />
	<link type="text/css" href="css/jquery.mobile.simpledialog.css" rel="stylesheet" />
    	<link type="text/css" href="css/main.css" rel="stylesheet" />

    <script type="text/javascript" src="js/jquery-1.6.4.js"></script> 
 	<script type="text/javascript" src="js/jquery.mobile-1.0rc2.min.js"></script>
	<script type="text/javascript" src="http://dev.jtsage.com/jquery.mousewheel.min.js"></script>
    <script type="text/javascript" src="js/jquery.mobile.simpledialog.js"></script> 
    
    


	</head> 

    
<body>

        <div data-role="header" data-position="inline">
            
            <h1 style="margin-top: 12px;text-align:center">
				Groesse mit Markensuche bestimmen
            </h1>
    
        </div>    
            <div id="msg"></div>
            
			<p>You have entered: <span id="dialogoutput"></span></p>
        	<label for="name" style="margin-left:5px; margin-top:9px">Bitte waehlen:</label>
              
            <select name="marke" data-native-menu="false" id="cbtest" data-theme="b" data-icon="arrow-d"  >
                <option value="maennlich">M&auml;nnlich</option>
                <option value="weiblich">Weiblich</option>
            </select>
    

		<script type="text/javascript"> 
			var itemname = "test123";
			var content_html = "";
			
			function updateGroessenContent(itemid){
				
				itemname = "fdfssdfsdf";
				
				var content_html = "<label for='name' style='margin-left:5px; margin-top:9px'>Groesse waehlen:</label>"
				+ "<select name='marke' id='cbtest' data-theme='b' data-icon='arrow-d' >"
				+ "<option value='maennlich'>"+ itemname + "</option>"
				+ "<option value='weiblich'>Weiblich</option>"
				+ "</select>"
				+ "<a rel='close' data-role='button' href='#' id='simpleclose'>Schliessen</a>";
								
				
				$('#simpleraw').data('simpledialog').options.fullHTML = content_html;
				$('#simpleraw').simpledialog('refresh');
				
				
			}
			
			//$(document).delegate('#simpleraw', 'click', function() {
			function mytest(){
				$(document).ready(function() {
						//msg.append($('#eventData'));
						content_html = "<label for='name' style='margin-left:5px; margin-top:9px'>Groesse waehlen:</label>"
						+ "<select name='marke' id='cbtest' data-theme='b' data-icon='arrow-d' >"
						+ "<option value='maennlich'>"+itemname+"</option>"
						+ "<option value='weiblich'>Weiblich</option>"
						+ "</select>"
						+ "<a rel='close' data-role='button' href='#' id='simpleclose'>Schliessen</a>";
														
						$('#simpleraw').simpledialog({
							'mode' : 'blank',
							'prompt': false,
							'forceInput': false,
							'useModal':true,
							'fullHTML' : content_html
						})
						//$('simpleraw').simpledialog('open');
						//$('#simpleraw').data('simpledialog').options.fullHTML = "...";
						updateGroessenContent();
				}); 
			}
		</script> 
			

		
        
        <ul class="friends" data-role="listview" >
            <li><a data-rel=\"dialog\" href="javascript:mytest()" id="simpleraw" >Marke: item.mname <br/>Kategorie: item.cname </a>
            </li> 
        </ul>



		<script type="text/javascript">
		 	//var buffer = [];
			var msg = $("#msg"); 
            ladeMarkendaten1();
			msg.append('laden');
			
            function ladeMarkendaten1(){
				
						// Create an array of friends.
				var buffer = [];
				buffer.push( createFriendNode( "Joanna" ) );
				buffer.push( createFriendNode( "Lisa" ) );
				buffer.push( createFriendNode( "Tricia" ) );
				buffer.push( createFriendNode( "Kim" ) );
				 
				// Append the friends to the DOM.
				$( "ul.friends" ).append( buffer.join('\n') );
					   
        		//okPromt();
            }

            function createFriendNode( name ){
             
                // Create the friend node.
                return "<li><a data-rel=\"dialog\" href=\"javascript:mytest()\" id=\"simpleraw\" >" + name + "<br/>Kategorie:"+  name +"</a></li>";
            }      
			
		</script>


</body>
</html>
